<template>
  <div class="os-404">
    <div class="os-lottie-404">
      <lottie-web :src="dataJson" />
      <div class="os-404-but">
        <el-button type="primary" round @click="goHone">首页</el-button>
        <el-button type="primary" round plain @click="goBack">返回</el-button>
      </div>
    </div>
  </div>
</template>

<script lang="ts" setup name="404">
import { useRouter } from 'vue-router'
import dataJson from '@/assets/lottie/404.json'
import LottieWeb from '@/components/LottieWeb/index.vue'
const router = useRouter()

const goHone = () => {
  router.push({ name: 'Home' })
}

const goBack = () => {
  router.go(-1)
}
</script>

<style scoped>
.os-404 {
  width: 100%;
  height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
}

.os-lottie-404 {
  width: 600px;
  max-width: 100%;
}

.os-404-but {
  display: flex;
  justify-content: center;
}
</style>
